#include<iostream>
#include<vector>
using namespace std;

class Solution {
public:
    int hammingDistance(int x, int y) {
        int ret = 0;
        while (x || y)
        {
            int tmp1 = x & 1;
            int tmp2 = y & 1;
            x = x >> 1;
            y = y >> 1;
            if (tmp1 != tmp2) ret++;
        }
        return ret;
    }
};